#ifndef RAT_H
#define RAT_H

#include <iostream>

struct fraction
{
	fraction (int, int);
	fraction (int);
	fraction (const fraction&);
	void print() const;
	fraction& operator += (const fraction&);
	fraction& operator -= (const fraction&);	
	fraction& operator /= (const fraction&);
	fraction& operator *= (const fraction&);
	fraction& operator ++ ();
	fraction operator ++ (int); 
	fraction& operator -- ();
	fraction operator -- (int); 
	operator double();
	fraction operator- ();
	
	void simplify ();
	int GCD (int, int );
	
	int up;
	int down;	
};


bool operator > ( const fraction&, const fraction& );
bool operator < ( const fraction&, const fraction& );
bool operator == ( const fraction&, const fraction& );
bool operator >= ( const fraction&, const fraction& );
bool operator <= ( const fraction&, const fraction& );
bool operator != ( const fraction&, const fraction& );
fraction operator + ( const fraction&, const fraction& );
fraction operator - ( const fraction&, const fraction& );
fraction operator * ( const fraction&, const fraction& );
fraction operator / ( const fraction&, const fraction& );

#endif
